﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DataAccessLayer;
using System.Data;
using System.Configuration;
using DTO;
using ABCComputer.DAL;

namespace ABCComputer.BLL
{
    public class SanPhamBLL
    {
        private SanPhamDAL spDAL;
        private List<SanPhamDTO> lstSP;
        public SanPhamBLL()
        {
            spDAL = new SanPhamDAL();
            lstSP = new List<SanPhamDTO>();
        }
        
 
        // lấy toàn bộ thông tin sản phẩm
        public List<SanPhamDTO> getListSanPham()
        {
            return spDAL.getListSanPham();
        }

        // lay thong tin 1 san pham
        public SanPhamDTO getSanPham(string masp)
        {
            SanPhamDTO sp = new SanPhamDTO();
            return spDAL.getSanPham(masp);
        }

        // lay thong tin san pham full
        public List<SanPhamFullDTO> getSanPhamFull(string masp)
        {
            return spDAL.getSanPhamFull(masp);
        }

        // lay thong tin san pham cho gio hang
        public GioHangDTO getSanPhamVaoGioHang(string masp)
        {
            GioHangDTO gh = new GioHangDTO();
            return spDAL.getSanPhamVaoGioHang(masp);
        }

        // lấy danh sách sản phẩm mới 
        public List<SanPhamDTO> getListSanPhamMoi()
        {
            return spDAL.getListSanPhamMoi();
        }


        // thu nghiem lay san pham co list hinh anh
        public List<SanPhamFullDTO> getListSanPhamHot()
        {
            return spDAL.getListSanPhamHot();
        }

        

    }
}